Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't quote "blob:" in CSP #37

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Don't quote "blob:" in CSP #37

merged 1 commit into from
Sep 15, 2024

Conversation

jtbandes
Copy link
Contributor

Hi, thanks for creating this plugin. I ran into a problem using it and loading a worker from a blob: url. I think this line is incorrect:

if (v.startsWith("sha") || v === "*" || v === "blob:") return `'${v}'`;

According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#scheme-source blob: should not be surrounded in quotes.

@RockiRider RockiRider merged commit d2a0cfc into RockiRider:main Sep 15, 2024
1 check passed
@jtbandes jtbandes deleted the patch-1 branch September 16, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants